package entity

import (
	"../constants"
	"../trace"
)

type UserParams struct {
	Method           string
	TraceRequest     bool
	DisableKeepAlive bool
	MonitorNetwork   bool
	UnitOfTime       string
	Url              string
	Headers          string
	Body             string
	Qps              int
	Time             int
	SendingRate      int
	Timeout          int64
	TotalSleepTime   int64
	Interval         int
}

type Result struct {
	trace.UsedTime
	TotalTime       int64             `json:"totalTime"`
	ResponseStatus  int               `json:"responseStatus"`
	ResponseBody    string            `json:"responseBody"`
	ResponseHeaders map[string]string `json:"responseHeaders"`
	ErrorType       int               `json:"errorType"`
}

func NewResult() *Result {
	return &Result{ErrorType: constants.NoError, ResponseHeaders: make(map[string]string)}
}
